概率论与数理统计笔记


网站渲染LaTeX存在严重失真,如有需要请Email联系我获取PDF版本笔记。

Chapter 1 事件与概率 Random Events and Probability

1.1 随机试验和随机事件

  1. 随机现象:自然界中的客观现象,当人们观测它时,所得结果不能预先确定,而仅仅是多种可能结果之一。

  2. 随机试验 random experiment:随机现象的实现和对它某个特征的观测。

  3. 基本事件 elemental event:随机试验中的每个单一结果,犹如分子中的原子,在化学反应中不可再分。

    e.g. 硬币抛3次,有8种结果:正正正、正正反、正反正……这8种可能结果的每一个都是基本事件。

  4. 随机事件 random event:简称事件 event,在随机试验中我们所关心的可能出现的各种结果,它由一个或若干个基本事件组成。通常用英文大写字母表示或{一种叙述}来表示。

  5. 样本空间 sample space:随机试验中所有基本事件所构成的集合,通常用ΩS表示。Elemental event is the element of sample space, so it is also called sample point

    e.g. 掷一枚骰子,观察出现的点数,则Ω = {1, 2, 3, 4, 5, 6}.

  6. 必然事件 certain event(Ω):在试验中一定会发生的事件。

  7. 不可能事件 impossible event():在试验中不可能发生的事件。

1.2 事件的运算

  1. 子事件A ⊂ B事件A发生蕴含时间B一定发生,则时间A成为事件B的子事件。若A ⊂ B,且B ⊂ A,则称时间A与事件B相等,记为A = B.

    img
  2. 事件的和 the sum / union of events(A ∪ B):事件A和事件B中至少有一个发生称为事件A和事件B的和。

    img
  3. 事件的积 the product / intersection of events(A ∩ B):事件A和事件B同时发生称为A和事件B的积。如果A ∩ B = ϕ,则称AB不相容,即事件AB不能同时发生。

    img
  4. 对立事件 the complementary / inverse event Ac(或):A不发生这一事件称为事件A​的对立事件(或余事件)。

    img
  5. 事件A和事件B的差 the difference of events(A − B):事件A发生而事件B不发生这一事件称为事件A和事件B的差,或等价于ABc.

    img
  6. De Morgan 对偶法则 De Morgan dualization law

上式可推广到n个事件:

1.3 概率的定义 Event Probability

  概率是随机事件发生可能性大小的数字表征,其值在0和1之间,即概率是事件的函数。概率有以下定义:

1.3.1 古典概率 Classical Probability Model

  设一个试验有N个等可能的结果,而事件E恰包含其中的M个结果,则事件E的概率,记为P(E),定义为

P(E) = M/N

P(E) = #(M)/#(N),

其中,#(M)为事件M中基本事件的个数。

  古典概型有两个条件

  • 有限性,试验结果只有有限个(记为n),
  • 等可能性,每个基本时间发生的可能性相同。

注:古典概率可引申出“几何概率”。

1.3.2 概率的统计定义 Statistical Probability

  古典概率的两个条件往往不能满足,但可以将事件的随机试验独立反复做n次(Bernouli试验),设事件A发生了nA次,称比值为事件A发生的频率,当n越来越大时,频率会在某个值p附近波动,且波动越来越小,这个值p就定义为事件A的概率。该学派为频率派。

注:不能写为,因为不是n的函数。

1.3.3 主观概率 Subjective Probability

  主观概率可以理解为一种心态或倾向性。究其根由,大抵有二:一是根据其经验和知识,二是根据其利害关系。该学派在金融和管理有大量的应用,这一学派成为Bayes学派。

1.3.4 概率的公理化定义 Axiomatic Definition of Probability

  对概率运算规定一些简单的基本法则:

  1. 非负性 non-negativity:设A是随机事件,则0 ≤ P(A) ≤ 1,

  2. 规范性 normalization:设Ω为必然事件,则P(Ω) = 1, 设为不可能事件,则P(∅) = 0,

  3. 可列可加性 countable additivity:若事件AB不相容,则P(AB) = P(A) + P(B),

    可推广至无穷:. (加法定理 Addition Law of Exclusive Events)

注:

  1. P(AB) = P(A) + P(B) − P(AB) > P(ABC) = P(A) + P(B) + P(C) − P(AB) − P(AC) − P(BC) + P(ABC) (一般加法定理 General Addition Law)
  2. (对立事件公式 Difference Formula of Events)
  3. P(AB) = P(A) − P(AB) (事件之差公式 Complementary Event Formula)

1.4 古典概率计算

1.4.1 排列组合

  • 选排列:n个不同元素中取r个不同取法(1 ≤ r ≤ n),Prn = n(n−1)...(nr+1).
  • 重复排列:n个不同元素中可重复地取r个不同取法(1 ≤ r ≤ n),Prn = nr.
  • 组合:同选排列,但不考虑次序,.

注:

  1. 排列英文为 Permutation,组合英文为 Combination.
  2. 0!为1。当r不是非负整数时,记号r!没有意义.
  3. 一些书中将组合写成CnrCrn,更通用的是.

1.4.2 其他公式

  • 组合系数又常称为二项式系数

  • n个相异物件分成k堆,各堆物件数分为r1, ..., rk的方法是

n!/(r1!...rk!).

1.5 条件概率 Conditional Probability

  条件概率就是知道了一定信息下得到的随机事件的概率。设事件AB是随机试验Ω中的两个事件,P(B) > 0,称

为事件B发生条件下事件A发生的条件概率,可用图形表示:

img

注:事实上,我们所考虑的概率都是在一定条件下计算的,因为随机试验就是在一定条件下进行的。

1.5.1 条件概率性质

  给定A发生,P(A) > 0

  • 0 ≤ P(B|A) ≤ 1
  • 0 ≤ P(Ω|A) = 1
  • B1 ∩ B2 = ϕ1,则P(B1B2|A) = P(B1|A) + P(B2|A),可推广至无穷。

1.5.2 乘法定理 Multiplication Theorem of Probability

  由,可推广至

P(A1A2...An) = P(A1)P(A2|A1)...P(An|A1...An − 1)

注: 右边看似麻烦,其实容易算,左边看似简单,但是难算。

1.6 全概率 Total Probability

  设B1, B2, ...Bn是样本空间Ω中的两两不相容的一组事件,即BiBj = ϕi ≠ j,且满足,则称B1, B2, ...Bn是样本空间Ω​的一个分割 partition(又称为完备事件群 Collectively exhaustive events)。

  P(Bi) is also known as prior probability. Prior probability, in Bayesian statistics, is the probability of an event before new data is collected. A is composed of the sum of all the exclusive events, and P(A) is called total probability.

  设{B1, B2, ...Bn}是样本空间Ω的一个分割,AΩ的一个事件,则(全概率公式 Law of Total Probability)

img

Proof

  Since B1, B2, ...Bn are mutually exclusive, AB1, AB2, ...ABn are also mutually exclusive. Therefore, by addition theorem and multiplication theorem we can get

注:有时不易直接计算事件A的概率,但是在每个BiA的条件概率容易求出

1.7 Bayes公式 Bayes’ Theorem(逆概率公式)

  设{B1, B2, ...Bn}是样本空间的一个分割,AΩ中的一个事件,P(Bi) > 0i = 1, 2, ..., nP(A) > 0,则

Proof: From conditional probability formula, substitute law of total probability and multiplication theorem.

注:当有因果关系互换时必须用Bayes公式。

1.8 事件的独立性 Independence of Events

  设AB是随机试验中的两个事件,若满足P(AB) = P(A)P(B),则称事件AB相互独立。判断事件的独立,应该是从实际出发,如果能够判断事件B的发生与否对事件A的发生与否不产生影响,则事件AB​即为独立。

  If events A and B are mutually independent, then A and , and B, and are all mutually independent.

  设表示事件A发生和不发生之一,表示事件B发生和不发生之一。有独立性的定义可推至P() = P()P()(一共有四个等式 [if and only if (iff)])。可推广至:

P(12...n) = P(1)...P(n)

上面有2n个等式。

注:独立(independent)和不相容(exclusive)是不同的两个概念,前者有公共部分,后者没有公共部分,独立一定相容。

1.8.1 独立事件的条件概率 Conditional Probability of Independent events

  If P(A) > 0, then the equivalent condition of events A and B being mutually independent

P(B) = P(B|A)

1.9 重要公式与结论

Chapter 2 随机变量及其分布 Random Variables and Their Distribution

2.1 随机变量的概念 Random Variable

  1. 随机变量 Random variable:值随机会而定的变量,研究随机试验的一串事件。可按维数分为一维、二维至多维随机变量。按性质可分为离散型随机变量以及连续型随机变量。A random variable is a function that assigns numeric values to different events in a sample space.
  2. 分布 Distribution:事件之间的联系,用来计算概率。
  3. 示性函数 Indication function: ,事件A有随机变量IA表示出来,IA称为事件A的示性函数。

2.2 离散型随机变量及其分布 Discrete Random Variables

  1. 离散型随机变量 discrete random variables:X为一随机变量,如果X只取有限个或可数个值,则称X为一个(一维)离散型随机变量。A random variable for which there exists a discrete set of numeric values is a discrete random variable.

  2. 概率函数:X为一随机变量,其全部可能值为{a1, a2, ...},则pi = P(X=ai), i = 1, 2, ...称为X的概率函数。

  3. 概率分布:离散型随机变量的概率分布可以用分布表来表示:

    可能值 a1 a2 ai
    概率 p1 p2 pi
  4. 概率分布函数 cumulative-distribution function:

    • 定义:X​为一随机变量,则函数

      F(X) = P(Xx)  (−∞<x<∞)

      称为X​的分布函数。(注:这里并未限定X​为离散型的,它对任何随机变量都有定义。

    • 性质:

      • 单调性:F(x)是单调非降的:x1 < x2,有F(x1) ≤ F(X2).
      • 有界性:0 ≤ F(x) ≤ 1;当x → ∞时,F(x) → 1;当x →  − ∞时,F(x) → 0.
      • 右连续性:x0, limx → x0 + 0F(x) = F(x0), that is, F(x) is a right continuous function. F(x)右连续非左连续。
    • Relationship between probability and distribution function:

    • 离散型随机变量分布函数:

      对于离散型随机变量,F(X) = P(Xx) = ∑(i|aix)pi​, pi = P(X=i) = F(i) − F(i−1)​。

  5. 伯努利分布(Bernoulli’s distribution)

    • 定义:A discrete random variable X is said to follow the Bernoulli’s distribution, which is denoted by X ∼ B(1,p), if P{X = 1} = p, P{X = 0} = 1 − p. (0<P<1)

    • Bernoulli’s distribution is associated with the trial which has only two possible outcomes (A and ) that are not necessarily equally likely.

    • Let the random variable X = {the number of outcome A occurs}. Then

  6. 二项分布(Binomial distribution)

    • 定义:设某事件A在一次试验中发生的概率为p,先把试验独立地重复n次,以XA在这n次试验中发生的次数,则X取值0, 1, ..., n,且有

      X服从二项分布,记为X ∼ B(n,p).

    • 服从二项分布的条件:1. 各次试验的条件是稳定的,即事件A的概率p​在各次试验中保持不变;2. 各次试验的独立性

    • The most probable value 最可能值:

      • Proof:
  7. 泊松分布(Poisson distribution)

    • 定义:设随机变量X的概率分布为

      则称X服从参数为λ的Poisson分布,并记X ∼ P(λ).

    • 特点:

      • 描述稀有事件发生概率

      • 作为二项分布的近似。若X ∼ B(n,p),其中n很大,p很小,而np = λ不太大时(一般n > 30, np ≤ 5),则X的分布接近泊松分布P(λ). Binomial distribution: there are a finite number of trials n, and the number of events can be no larger than n. Poisson distribution: the number of trials is essentially infinite and the number of events can be indefinitely large.

      • Theorem: Let λ > 0 be a constant. Suppose n is any positive integer and λ = npn. Then for any nonnegative integer k, we have

        The Poisson approximation theorem suggests: If n is large and p is small (generally n ≥ 30, p ≤ 0.2), we have

    • 推导:

      若事件A ∼ B(n,p),且n很大,p很小,而np = λ不太大时,设λ = np

2.3 连续型随机变量及其分布 Continuous Random Variables

  1. 连续型随机变量 continuous random variable:X为一随机变量,如果X不仅有无限个而且有不可数个值,则称X为一个连续型随机变量。A random variable whose possible values cannot be enumerated is a continuous random variable.

  2. 概率密度函数 probability-density function:

    • 定义:The probability density function f(x) of the continuous random variable X is a function whose integral from x = a to x = b (∀a,bR and ba) gives the probability that X takes a value in the interval (a, b], i.e. 设连续型随机变量X有概率分布函数F(x),则F(x)的导数f(x) = F′(x)称为X​的概率密度函数。

      P{a < X ≤ b} = ∫abf(X) dx

    • 性质:

      • F(x) is a continuous function;
      • 对于任意的 − ∞ < a ≤ b <  + ∞,有P(aXb) = F(b) − F(a) = ∫abf(x)dx​​;
      • F′(x) = f(x);​
      • 对于任意的 − ∞ < x <  + ∞,有P(X=x) = ∫xxf(u)du = 0.
    • 注:

      • 对于所有的 − ∞ < x <  + ∞,有f(x) ≥ 0
      • −∞+∞f(x)dx = 1
      • 假设有总共一个单位的质量连续地分布在a ≤ x ≤ b上,那么f(x)表示在点x的质量密度且cdf(x)dx表示在区间[c,d]上的全部质量。
  3. 概率分布函数 cumulative-distribution function:X为一连续型随机变量,则

    F(x) = ∫−∞xf(u)du,   − ∞ < x <  + ∞

  4. 正态分布(Normal distribution):

    • 定义:如果一个随机变量具有概率密度函数

      其中 − ∞ < μ <  + ∞, σ2 > 0,则称X为正态随机变量,并记为X ∼ N(μ,σ2).特别地,μ = 0, σ = 1的正态分布成为标准正态分布。用Φ(x)ϕ(x)表示标准正态分布N(0,1)的分布函数和密度函数。

    • The distribution function of normal distribution is

      From the symmetry of density function of normal distribution, we know that F(μ) = 0.5 2. We indicated that parameters μ, σ2 are, respectively, the expected value and variance of the normal distribution, i.e., if X ∼ N(μ,σ2), then E(X) = μD(X) = σ2 3. A normal distribution with parameters μ, σ2 is completely determined by its expected value and variance.

    • 性质:

      • 正态分布的密度函数是以x = μ为对称轴的对称函数,μ称为位置参数,密度函数在x = μ处达到最大值,在(−∞,μ)(μ,+∞)内严格单调。
      • σ的大小决定了密度函数的陡峭程度,通常称σ为正态分布的形状参数。
      • X ∼ N(μ,σ2),则Y = (Xμ)/σ ∼ N(0,1).
      • Φ(−k) = 1 − Φ(k)
    • Theorem:

      • 有限个相互独立且服从正态分布的随机变量,其任意线性组合也服从正态分布。
        1. If X ∼ N(μ,σ2), then for any constants a, b, aX + b ∼ N(aμ+b,a2σ2)
        2. If X ∼ N(μ1,σ12), Y ∼ N(μ2,σ22), and X and Y are independent variables, then X ± Y ∼ N(μ1±μ2,σ12±σ22)
    • Standard normal distribution 标准正态分布:

      • 定义:A normal distribution with mean 0 and variance 1 is called a standard normal distribution. This distribution is denoted by N(0,1).

      • In general, ϕ(x) and Φ(x)​ are used to represent density function and distribution function of a standard normal distribution, respectively, that is,

        Misplaced & \phi(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}},&-\infty<x<+\infty\\ \Phi(x)=\int^{x}_{-\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{t^2}{2}}\,dt&-\infty<x<+\infty

      • The standard normal distribution is symmetric about x = 0​.

      • Thanks to the widespread use of normal distribution, values of normal distribution function are tabulate for positive values of x. The table is called normal table.

        Φ(x) = P{X ≤ x} =  area to the left of x

        Obviously, Φ(0) = 0.5.

        If X ∼ N(0,1), then P{a < X ≤ b} = Φ(b) − Φ(a)

      • For the negative values of x, since symmetry properties of standard normal distribution and the area between the density curve and x-axis of equals 1, it follows that Φ(−x) = 1 − Φ(x).

    • Conversion from an N(μ,σ2) distribution to an N(0,1) distribution:

      • We convert the normal variable X to its standardized variable , then we have

      • Theorem: If X ∼ N(μ,σ2) and F(x) is the distribution function of X, then

        Proof:

      1. If X ∼ N(μ,σ2), then

      1. Probabilities for any normal distribution can now be evaluated using the normal table. 3. If X ∼ N(μ,σ2), then

      When k = 1, 2, 3,

    • Upper percentile of standard normal distribution

      • Definition: Given α and X ∼ N(0,1), if

        then uα is called the upper 100 × αth percentile 上侧 α 分位数 or critical value 临界值 of a standard normal distribution N(0,1).

      • Given α, it follows that Φ(uα) = P{X ≤ uα} = 1 − P{X > uα} = 1 − α. And uα can be obtained from referring to normal table.

        For example, if α = 0.05, then . Refer to normal table, u * α = 1.645.

      • Assume X ∼ N(μ,σ2). If P{X > x0} = α then x0 is the upper 100 × αth percentile or critical value of a normal distribution N(μ,σ2)

  • 图像(密度和分布函数图):

img

img

  1. 指数分布(Exponential distribution):
  • 定义:若随机变量X具有概率密度函数

    其中λ > 0为常数,则称X服从参数为λ的指数分布,并记X ∼ E(λ)

  • 概率分布函数:

  • 性质:

    • 无后效性(Memoryless Property),即无老化,要来描述寿命(如元件等)的分布。

      证明:

      “无老化”就是说在时刻x正常工作的条件下,其失效率总保持为某个常数λ > 0,与x无关,可表示

    • λ为失效率,失效率越高,平均寿命就越小。

  • 图像(密度函数):

    img
  1. 均匀分布(Uniform distribution):

    • 定义:a < b,如果分布F(x)具有密度函数

      则该分布为区间[a,b]上的均匀分布,记X ∼ U[a,b]

    • 概率分布函数:

    • 性质:

    • 数学期望:

2.4 多维随机变量(随机向量)

  1. 随机向量:X = {X1, ..., Xn}.如果每个Xi都是一个随机变量,i = 1, ..., n,则称Xn维随机变量或者随机向量。

  2. 离散型随机向量的分布:如果每一个Xi都是一个离散型随机变量,i = 1, ..., n,则称X = {X1, ..., Xn}为一n维离散型随机变量。设Xi的所有可能取值为{ai1, ai2, ...},  i = 1, ..., n,则称

    p(j1,...,jn) = P(X1=a1j1,...,Xn=anjn),  j1, ..., jn = 1, 2, ...

    n维随机变量X的概率函数,这也是其联合分布。

    其具有下列性质:

    • p(j1,...,jn) ≥ 0,  ji = 1, 2, ...,  i = 1, 2, ..., n;
    • j1, ..., jnp(j1,...,jn) = 1.

    注:对于高维离散型随机变量,一般不使用分布函数

  3. 多项式分布

    • 定义:A1, A2, ..., An是某一试验之下的完备事件群,分别以p1, p2, ..., pn记事件A1, A2, ..., An的概率,则pi ≥ 0,  p1 + ... + pn = 1.将试验独立地重复N次,以Xi记在这N次试验中事件Ai出现的次数(i=1,...,n),则X = (X1,...,Xn)为一个n维随机向量。该分布记作M(N;p1,...,pn).

    • 概率分布函数:

  4. 连续型随机向量的分布:X = {X1, ..., Xn}n维连续型随机变量,如果存在上的非负函数f(x1,...,xn),使得对任意的 − ∞ < a1 ≤ b1 <  + ∞, ...,  − ∞ < an ≤ bn <  + ∞,有

    P(a1X1b1,...,anXnbn) = ∫anbn...∫a1b1f(x1,...,xn)dx1...dxn

    则称为fX的概率密度函数。有

    P(a1X1b1,...,anXnbn) = F(x1,...,xn)

    则称为FX的(联合)分布函数。其中分布函数F(X1,...,Xn)具有下述性质:

    • F(x1,...,xn)单调非降;
    • 对任意的1 ≤ j ≤ n,有limxj →  − ∞F(x1,...,xn) = 0
    • limx1 → ∞, ..., xn → ∞F(x1,...,xn) = 1
  5. 边缘分布:因为X的每个分量Xi都是一维随机变量,故它们都有各自的分布Fi (i=1,...,n),这些都是一维分布,称为随机向量X或其分布F的边缘分布。

    • 离散型随机向量

      img

      行和与列和就是边缘分布。即固定某个xi,即可计算边缘分布,故有

    • 连续型随机向量

      为求某分量Xi的概率密度函数,只需把f(x1,...,xn)中的xi固定,然后对x1, ..., xi − 1, xi + 1, ..., xn − ∞之间做定积分,如

注:二维正态分布N(a,b,σ12,σ22,ρ)的边缘分布密度分别是一维正态分布N(a,σ12)N(b,σ22)。因此联合分布可推边缘分布,而边缘分布不可推联合分布。

2.5 条件分布和随机变量的独立性

  1. 离散型随机变量的条件分布:(X,Y)为二维离散型随机变量,对于给定的事件{Y = yj},其概率P(Y=yj) > 0,则称

    为在给定Y = yj的条件下X的条件分布律。类似的,称

    为在给定X = xj的条件下Y的条件分布律。

  2. 连续型随机变量的条件分布:(X,Y)为二维连续型随机变量,对于给定条件Y = y下的条件概率密度为

    类似的,在X = x下的条件概率密度为

    二维正态分布ρ = 0时,其联合密度分布等于条件密度分布的乘积。

  3. 随机变量的独立性

    称随机变量X1, ..., Xn相互独立,

    • 离散型随机变量

      则联合分布律等于各自的边缘分布律的乘积,即

      P(X1=x1,...,Xn=xn) = P(X1=x1)...P(Xn=xn)

      其中(x1,...xn)(X1,...,Xn)的值域中的任意一点。

    • 连续型随机变量

      则联合密度等于各自的边缘密度的乘积,即

    • 更具一般地

      X1, ..., Xnn个随机变量,如果它们的联合分布函数等于各自边缘分布函数的乘积,即

      则称随机变量X1, ..., Xn相互独立。

    一些重要的结论

    img

2.6 随机变量的函数的概率分布

  最简单的情形,是由一维随机变量X的概率分布去求其一给定函数Y = g(X)的分布。较为常见的,是由(X1,X2,...,Xn)的分布去求Y = g(X1,X2,...,Xn)的分布。更一般地,由(X1,X2,...,Xn)的分布去求(Y1,Y2,...,Ym)的分布,其中Yi = gi(X1,X2,...,Xn),  i = 1, 2, ..., m.

  1. 离散型分布的情形:X的分布律为P(X=xi) = pi,  i = 1, 2, ...

    g : R → R,令Y = g(X),则Y的分布律为

    P(Y=yj) = P(g(X)=yj) = ∑xi : g(xi) = yjP(X=xi) = ∑i : g(xi) = yjpi

    即把Y = g(X1,...,Xn)可以取的不同值找出来,把与某个值相应的全部(X1,...,Xn)值的概率加起来,即得Y取这个值的概率。

  2. 连续型分布的情形

    • 一个变量的情况

      X有密度函数f(x).设Y = g(x)g是一个严格单调的函数,即当x1 < x2时,必有g(x1) < g(x2)或当x1 > x2时,必有g(x1) > g(x2).又设g的导数g存在。由于g的严格单调性,其反函数X = h(Y)存在,且h的导数h也存在。有g(X)的密度函数l(y)

      l(y) = f(h(y))|h′(y)|.

    • 多个变量的情形

      以两个为例,设(X1,X2)的密度函数f(x1,x2)Y1, Y2都是(X1,X2)的函数:

      Y1 = g1(X1,X2),  Y2 = g2(X1,X2),

      要求(Y1,Y2)的概率密度函数l(y1,y2).假定(X1,X2)(Y1,Y2)的一一对应变换有逆变换:

      X1 = h1(Y1,Y2),  X2 = h2(Y1,Y2)

      即雅可比行列式

      不为0.在(Y1,Y2)的平面上任取一个区域A,变换后到(X1,X2)平面的区域B,则有

    • 随机变量和的密度函数

      (X1,X2)的联合密度函数为f(x1,x2)Y = X1 + X2的密度函数:

      • 一般的,l(y) = ∫−∞f(x1,yx1)dx1 = ∫−∞f(x,yx)dx.
      • X1, X2独立,则l(y) = ∫−∞f1(x)f2(yx)dx = ∫−∞f1(yx)f2(x)dx.

      两个独立的正态变量的和仍服从正态分布,且有关的参数相加,其逆命题也成立。

    • 随机变量商的密度函数(X1,X2)的联合密度函数为f(x1,x2)Y = X1/X2的密度函数:

      • 一般的,l(y) = ∫0x1f(x1,x1y)dx1.
      • X1, X2独立,则l(y) = ∫0x1f1(x1)f2(x1y)dx1.
  • 统计学三大分布

    引入两个重要的特殊函数:

    Γ(x) = ∫0ettx − 1dt  (x>0)B(x,y) = ∫01tx − 1(1−t)y − 1dt  (x>0,y>0)

    其中,

    B(x,y) = Γ(x)Γ(y)/Γ(x+y)

    • 卡方分布,记作χn2

      密度函数:

      性质:1. 设X1, X2独立,X1 ∼ χm2, X2 ∼ χn2,则X1 + X2 ∼ χm + n2

      1. X1, ..., Xn独立,且都服从指数分布,则X = 2λ(X1+...+Xn) ∼ χ2n2
    • t分布,记作tn

      X1X2独立,X1 ∼ χn2, X2 ∼ N(0,1),而,则Y ∼ tn.

      密度函数:

      性质:密度函数关于原点对称,其图形与正态分布N(0,1)的密度函数的图形相似。

    • F分布,记作Fmn

      X1, X2独立,X1 ∼ χn2, X2 ∼ χm2,而Y = m−1X2/(n−1X1),则Y ∼ Fmn

      密度函数:

    三大分布的几个重要性质

    1. X1, ..., Xn独立同分布,有公共的正态分布N(μ,σ2).记.则.
    2. X1, ..., Xn的假定同1,则
    3. X1, ..., Xn, Y1, ..., Ym独立,Xi各有分布N(μ1,σ12)Yj各有分布N(μ2,σ22),则 σ12 = σ22,则

Chapter 3 随机变量的数字特征 Numerical Features of Random Variables

3.1 数学期望 Expected Value

  1. 数学期望 Expected Value

    • 定义:设随机变量X只取有限个可能值a1, ..., am,其概率分布为P(X=ai) = pi (i=1,...,m). 则X的数学期望记作E(X)*E(X),定义为E(X) = a1p1 + a2p2 + ... + ampm. 数学期望也常称为”均值“,即指以概率为权的加权平均。

    • 离散型变量的数学期望:(当级数绝对收敛,即

    • 连续型变量的数学期望:E(X) = ∫−∞xf(x)dx.(当−∞|x|f(x)dx < ∞

    • 常见分布的数学期望:

      • 泊松分布:E(X) = λ.

        i.e., E(X) = λ.

        注: eλ 的幂级数展开式:

      • 二项分布:E(X) = np.

      • 均匀分布:.

      • 指数分布:E(X) = λ−1.

      • 正态分布:E(X) = μ.

      • 卡方分布:E(X) = n.

      • t分布:E(X) = 0  (n>1).

      • F分布:E(X) = n/(n−2)  (n>2).

    • 性质:

      • 若干个随机变量之和的期望等于各变量的期望值和,即 E(X1+X2+...+Xn) = E(X1) + E(X2) + ... + E(Xn).
      • 若干个独立随机变量之积的期望等于各变量的期望之积,即 E(X1X2...Xn) = E(X1)E(X2)...E(Xn).
      • E(aX+b) = ∫−∞(ax+b)f(x) d(x) = aE(x) + b.
      • 设随机变量X为离散型,有分布P(X=ai) = pi(i=1,2,...);或者为连续型,有概率密度函数f(x). 则

      • c为常数,则E(cX) = cE(X)​.
      • c为常数,则E(c) = c.
  2. 条件数学期望

    • 定义:随机变量Y的条件期望就是它在给定的某种附加条件下的数学期望。E(Y|x) = ∫−∞yf(y|x)dy.它反映了随着X取值x的变化Y的平均变化的情况如何。在统计上,常把条件期望E(Y|x)作为x的函数,称为YX的回归函数。
    • 性质:
      • E(Y) = ∫−∞E(Y|x)fX(x)dx.
      • E(Y) = E[E(Y|X)].
  3. 中位数

    • 定义:设连续型随机变量X的分布函数为F(x),则满足条件P(Xm) = F(m) = 1/2的数m称为X或分布F的中位数。即m这个点把X的分布从概率上一切两半。
    • 性质:
      • 与期望值相比,中位数受特大值或特小值影响很小,而期望不然。
      • 中位数可能不唯一,且在某些离散型情况下,中位数不能达到一分两半的效果。

3.2 方差与矩

  1. 方差与标准差

    • 定义:X为随机变量,分布为F,则D(Xor Var(X) = E(XE(X))2称为X(或分布F)的方差,其平方根(取正值)称为X(或分布F​)的标准差。

    • 常见分布的方差:

      • 泊松分布:Var(X) = λ.

      • 二项分布:Var(X) = np(1−p).

      • 正态分布:Var(X) = σ2.

      • 指数分布:Var(X) = 1/λ2.

      • 均匀分布:Var(X) = (ba)2/12.

      • 卡方分布:Var(X) = 2n.

      • t分布:Var(X) = n/(n−2).

      • F分布:Var(X) = 2n2(m+n−2)/[m(n−2)2(n−4)]  (n>4).

    • 性质:

      • Var(X) = E(X2) − (EX)2.
      • 常数的方差为0,即Var(c) = 0.
      • c为常数,则Var(X+c) = Var(X).
      • c为常数,则Var(cX) = c2Var(X).
      • 独立随机变量和的方差等于各变量方差和,即Var(X1+...+Xn) = Var(X1) + ... + Var(Xn)​.
      • If X is discrete random variable, which has probability distribution P{X = xk} = pk, k = 1, 2, ..., then .
      • If X is continuous random variable, which has probability density function f(x), then E(X2) = ∫−∞x2f(x) dx.
    • 定义:X为随机变量,c为常数,k为正整数。则量E[(Xc)k]称为X关于c点的k阶矩。特别地,有两种重要的情况:

      1. c = 0 .这时ak = E(Xk)称为Xk阶原点矩。

      (2)c = E(X).这时μk = E[(XEX)k]称为Xk阶中心矩。

      一阶原点矩就是期望,一阶中心距μ1 = 0,二阶中心距μ2就是X的方差Var(X).

    • 两种重要应用:

      • 偏度系数:β1 = μ3/μ23/2.衡量概率分布函数f(x)是否关于均值对称。如果β > 0,则称分布为正偏或右偏;如果β < 0,则称分布为负偏或左偏;如果β = 0,则对称。(注:μ23/2为标准差的三次方,可将μ3缩放到一次因次)
      • 峰度系数:β2 = μ4/μ22.衡量概率分布函数f(x)在均值附近的陡峭程度。若X有正态分布N(μ,σ2),则β2 = 3.(注:μ22为标准差的四次方,将μ4缩放到一次因次。为了迁就正态分布,也常定义μ4/μ22 − 3为峰度系数,以使正态分布的峰度系数为0)

3.3 协方差与相关系数

  两者都反映了随机变量之间的关系。

  1. 协方差(Covariance)

    • 定义:E[(Xm1)(Ym2)]XY的协方差,并记为Cov(X,Y).
    • 性质:
      • Cov(X,Y)X, Y的次序无关,即Cov(X,Y) = Cov(Y,X).
      • Cov(c1X+c2,c3Y+c4) = c1c3Cov(X,Y).
      • Cov(X,Y) = E(XY) − E(X)E(Y).
      • X, Y独立,则Cov(X,Y) = 0.
      • [Cov(X,Y)]2 ≤ σ12σ22.等号当且仅当X, Y之间有严格线性关系(Y = a + bX)时成立。

    注:协方差的结果受随机变量量纲影响。

  2. 相关系数(Correlation coefficient)

    • 定义:Cov(X,Y)/(σ1σ2)X, Y的相关系数,并记为Corr(X,Y).
    • 性质:
      • X, Y独立,则Corr(X,Y) = 0.
      •  − 1 ≤ Corr(X,Y) ≤ 1,或|Corr(X,Y)≤1|,等号当且仅当XY有严格线性关系时达到。当Corr(X,Y) = 0时,推出X, Y不线性相关。

    注:相关系数常称为“线性相关系数”,实际上相关系数并不是刻画了X, Y之间消除量纲后“一般”关系的程度,而只是“线性关系的程度”。即使XY有某种严格的函数关系但非线性关系,|Corr(X,Y)|不仅不必为1,还可以为0.

    img

3.4 大数定理和中心极限定理

  1. 大数定理

    “大数”的意思,就是指涉及大量数目的观察值Xi,它表明这种定理中指出的现象只有在大量次数的试验和观察之下才能成立。

    • 定义:X1, X2, ..., Xn, ...是独立同分布的随机变量,记它们的公共均值为a.又设它们的方差存在并记为σ2.则对任意给定的ε > 0,有limn → ∞P(|na|≥ε) = 0.(该式表明,当n很大时,n接近a
  2. 中心极限定理

    即和的分布收敛于正态分布。

    • 定义:X1, X2, ..., Xn为独立同分布的随机变量,E(Xi) = a, Var(Xi) = σ2(0<σ2<∞).则对任何实数x,有.(Φ(x)为标准正态分布N(0,1)的分布函数)

    • 特例:X1, X2, ..., Xn独立同分布,Xi分布是P(Xi=1) = pP(Xi=0) = 1 − p (0<p<1).则对任何实数x,有.

      注:如果t1, t2是两个正整数,t1 < t2.则当n相当大时,近似地有

      P(t1X1+...+Xnt2) ≈ Φ(y2) − Φ(y1),

      其中

      若把y1, y2修正为

      在应用上式,则一般可提高精度。

Chapter 4 抽样分布 Sampling Distribution

4.1 总体与样本

  1. 总体

  在一个统计问题里,研究对象的全体叫做总体,构成总体的每个成员称为个体。All the possible observations of a trial is called population. Each observation is called individual. 根据个体的数量指标数量,定义总体的维度,如每个个体只有一个数量指标,总体就是一维的,同理,个体有两个数量指标,总体就是二维的。总体就是一个分布,数量指标就是服从这个分布的随机变量。   总体根据个体数分为有限总体无限总体,当有限总体的个体数充分大时,其可以看为无限总体。   As each individual of the population is the observation of a trial, it is also can be considered as the value of a certain random variable. Thus a population corresponds to a random variable X. From now on, we make no distinction between a population and a random variable, and it is generally referred to as population X (笼统称为总体X)

  • 参数 parameter: 总体X的数字特征即总体的特征指标。
  1. 样本

    • 定义:

      从总体中随机抽取的部分个体组成的集合称为样本,样本个数称为样本容量

    • 性质:

      • 二重性:抽取前随机,是随机变量;抽取后确定,是一组数值。

      • 随机性:每个个体都有同等的机会被选入样本。

    • 独立性:每个样本的取值不影响其他样本取值,即分部独立。

      满足后面两个性质称为简单随机样本,则

    • 样本容量 sample size: 样本中所含的个体数。当n ≥ 30时,称为大样本,否则称为小样本。

    • 简单随机样本 simple random sample: If carry out a trial repeatly and independently for n times and obtain n observations: X1, X2, ..., Xn, Then these n observations X1, X2, ..., Xn can be regarded as n random variables and is called a simple random sample 简单随机样本 of the population X, which has two properties:

      • X1, X2, ...Xn are independent;
      • X1, X2, ...Xn have the same distribution as the that of the population. > Xis are independent and identically distributed (i.i.d.) 独立同分布.
  2. 分组样本

      只知样本观测值所在区间,而不知具体值的样本称为分组样本。缺点:与完全样本相比损失部分信息。优点:在样本量较大时,用分组样本既简明扼要,又能帮助人们更好地认识总体。

4.2 样本数据的整理与显示

  1. 经验分布函数

      若将样本观测值x1, x2, ..., xn由小到大进行排列,得到有序样本x(1) ≤ x(2) ≤ ... ≤ x(n),用有序样本定义如下函数

    则称为Fn(x)为该样本的经验分布函数。

    img
  2. 格里纹科定理

      设x1, x2, ..., xn是取自总体分布函数为F(x)的样本,Fn(x)是该样本的经验分布函数,则当n →  + ∞时,有

    P(sup−∞ < x <  + ∞|Fn(x)−F(x)|→0) = 1

    表明当n相当大时,经验分布函数Fn(x)是总体分布函数F(x)的一个良好的近似。它是经典统计学的一块基石。

  3. 频数频率分布表

      有样本x1, x2, ..., xn制作频数频率分布表的操作步骤如下:

    • 确定组数k;
    • 确定每组组距,通常取每组组距相等为d(方便起见,可选为整数);
    • 确定组限(下限a0略小于最小观测值,上限ak略大于最大观测值);
    • 统计样本数据落入每个区间的频数,并计算频率。

    该表能够简明扼要地把样本特点表示出来。不足之处是该表依赖于分组,不同的分组方式有不同的频数频率分布表。

    img
  4. 直方图

    • 利用频数频率分布表上的区间(横坐标)和频数(纵坐标)可作为频数直方图;
    • 若把纵坐标改为频率就得频率直方图;
    • 若把纵坐标改为频率/组距,就得到单位频率直方图。这时长条矩形的面积之和为1.
    img
  5. 茎叶图

      把样本中的每个数据分为茎与叶,把茎放于一侧,叶放于另一侧,就得到一张该样本的茎叶图。比较两个样本时,可画出背靠背的茎叶图。茎叶图保留数据中全部信息,当样本量较大,数据很分散,横跨二、三个数量级时,茎叶图并不适用

    img

4.3 统计量及其分布

  1. 统计量

  不含未知参数的样本函数称为统计量。统计量的分布称为抽样分布。

  To perform statistical inference, we construct appropriate functions of the sample to draw conclusions rather than random sample itself. Let X1, X2, ..., Xn be a random sample drawn from population X. Then ϕ(X1,X2,...,Xn) is called a statistic 统计量, if ϕ(X1,X2,...,Xn) is just a function of X1, X2, ..., Xn without any unknown parameters 未知参数.

For example: Assume X ∼ N(μ,σ2) with parameter μ unknown and σ known. Then is a statistic but is not a statistic.

  • As X1, X2, ..., Xn are random variables, the statistic ϕ(X1,X2,...,Xn) is also a random variable.
  • Let X1, X2, ..., Xn be a random sample drawn from population X. Frequently used statistics: sample mean and sample variance.
  • When generally referring to a sampling results,sample X1, X2, ..., Xn are n random variables,and then X and S2 are also random variables. 当泛指一次抽样结果时,样本X1, X2, ..., Xn是n个随机变量,则样本均值、样本方差等统计量也是随机变量;
  • When specifically referring to a specific sampling results, observations X1, X2, ..., Xn are n specific numbers, and then X and S2 are also specific numbers.当特指一次具体的抽样结果时,样本值X1, X2, ..., Xn是n个具体数值,从而样本均值、样本方差S2等统计量也是具体的数值所以,后面不引起混淆的情况下,对样本和统计量赋予双重意义:泛指时为随机变量,特指时为相应数值。
  1. 抽样分布

      Sampling distribution of a statistic: the distribution of the statistic. 统计量作为随机变量所服从的分布.

  2. 样本均值

  • 定义:

      样本x1, x2, ..., xn的算数平均值称为样本均值,记为.分组样本均值,其中n为样本量,k为组数,xifi为第i组的组中值和频率分组样本均值是完全样本均值的一种较好的近似

      样本均值是样本的位置特征,样本中大多数值位于左右。平均可消除一些随机干扰,等价交换也是在平均数中实现的。

  • 性质:

    • 样本数据xi对样本均值的偏差之和为零
    • 样本数据xi与样本均值的偏差平方和最小,即对任意的实数c有;
    • 若总体分布为N(μ,σ2),则的精确分布为N(μ,σ2/n)
    • 若总体分布未知,但其期望μ与方差σ2存在,则当n较大时,的渐进分布为N(μ,σ2/n),这里渐进分布是指n较大时的近似分布。

The sampling distribution of sample mean (If population variance σ2 is known)

Let X1, X2, …, Xn be a random sample from some population X with mean E(X) = μ and variance D(X) = σ2. Then

Because normal distribution is one of the most common distributions, we consider the sampling distribution of sample mean with samples drawn from normal population.

Theorem: If X1, X2, …, Xn ∼ N(μ,σ2) and are independent, then

If we standardize , then creating a new random variable

  1. 样本方差与样本标准差

  样本方差有两种,,后者为无偏方差,也是最常用的。(这是因为当σ2为总体方差时,总有,E(s2) = σ2,表明s*2有系统偏小的误差,s2无此系统偏差。)称为样本标准差。

  样本方差是样本的散布特征,s2越大样本越分散,s2越小分布越集中,样本标准差比样本方差使用更频繁,因为前者和样本均值有着相同的单位。

  s2的计算有如下三个公式可供选用:

在分组样本场合,样本方差的近似计算公式为

其中k为组数,xi, fi分别为第i个区间的组中值与频数,为分组样本的均值。

  1. 样本矩及其函数
  • 样本的k阶原点矩,样本均值为样本的一阶原点矩;
  • 样本的k阶中心距,样本方差s2s*2都为样本的二阶中心矩;
  • 样本变异系数Cr = s/
  • 样本的偏度,反映样本数据与对称性偏离程度和偏离方向;
  • 样本的峰度,反映总体分布密度曲线在其峰值附近的陡峭程度和尾部粗细.
img
  1. 次序统计量及其分布

      设x1, ..., xn是取自某总体的一个样本,x(i)称为该样本的第i个次序统计量(升序排序后,第i个样本)。

    • x(1) = min{x1, ..., xn}称为该样本的最小次序统计量

    • x(n) = max{x1, ..., xn}称为该样本的最大次序统计量

    • (x(1), x(2), ..., x(n)}称为该样本的次序统计量,即不独立也不同分布

    • R = x(n) − x(1)称为样本极差。 设总体X的密度函数为f(x),分布函数为F(x)x1, ..., xn为样本,则有

    • 样本第k个次序统计量x(k)的密度函数为

    • 样本第i个与第j个次序统计量的联合密度函数为

  2. 样本中位数与样本分位数

    x1, ..., xn是取自某总体的样本,x(1) ≤ x(2) ≤ ... ≤ x(n)为该样本的次序统计量,则样本中位数m0.5定义为

    样本的p分位数mp定义为

    其中[x]表示向下取整。中位数对样本的极端值有抗干扰性,或称有稳健性样本分位数的渐近分布:设总体的密度函数为f(x)xp为总体的p分位数。若p(x)xp处连续且p(xp) > 0,则当n充分大时,有

  3. 五数概括与箱线图

      五数指用样本的五个次序统计量,即最小观测值,最大观测值,中位数,第一4分位数和第三4分位数。其图形为箱线图,可描述样本分布形状。

    img
    img

4.4 χ2 Distributions

  1. Definition: if χ2 = X12 + X22 + ... + Xn2, where X1, X2, ..., Xn ∼ N(0,1) and the Xi’s are independent, then the statistic χ2 is said to follow a χ2 distribution with n degrees of freedom, which is denoted by χ2 ∼ χ2(n).

  2. The degree of freedom is the number of independent random variables in a statistic. It is often denoted by df and defined as follows:

    df = n − r

    Where n is the number of random variables in a statistic, r is the number of constraint conditions 约束条件 of these random variables.

    For example: There are n random variables Xi − , i = 1, …, n, and these random variables satisfy a constraint condition:

    Thus, the degrees of freedom of S2 is df = n − 1.

  3. If X ∼ N(0,1), then X2 ∼ χ2(1)

  4. Assume X ∼ N(μ,σ2). First standardize X, then

  5. Properties

    1. The chi-square distribution only takes positive values and is always skewed to the right.

    2. The skewness diminishes as n increases.

    3. When n →  + ∞, the distribution of χ2(n) approaches a normal distribution.

    4. If χ12 ∼ χ2(n1), χ22 ∼ χ2(n2) and χ12 and χ22 are independent, then χ12 + χ22 ∼ χ2(n1+n2)

  6. E(χ2) = n,  D(χ2) = 2n

  7. Theorem 2: If X1, X2, …, Xn ∼ N(μ,σ2) and are independent, then

    1. and S2 are independent.
    • Remark: Standardize Xi, then and However, if we substitute for μ in the above equation, then we lose 1 degree of freedom (constraint condition: ). i.e., Recall Thus
  8. Upper percentile of a χ2(n) distribution

    image-20241218180856268
    • Definition: The upper 100 × αth percentiles of a χ(n) distribution (i.e., a chi-square distribution with n df) is denoted by χα2(n) where

    P{χ2 > χα2(n)} = α

4.5 t 分布

If normal population variance σ2 is known, then the sample mean

If normal population variance σ2 is unknown, which can be replaced by S2, what will be the distribution of sample mean ?

  1. Definition

    If

    Where X ∼ N(0,1), Y ∼ χ2(n) and X and Y are independent, then statistic t is said to follow a t distribution with n degrees of freedom, which is denoted by t ∼ t(n).

  2. Properties

    1. t distribution is symmetric about 0 but is more spread out than the N(0,1) distribution.
    2. As n →  + ∞, the t distribution converges 收敛 to an N(0,1) distribution.
    3. When n is large enough (n ≥ 30), t distribution is approximated by a N(0,1) distribution; when n is small (n<30), these two distributions make a large difference.
  3. The sampling distribution of (if σ2 is unknown)

    1. If population variance σ2 is unknown, we replace population variance σ2 with sample variance S2, and we have the following theorem:

      Theorem : If X1, X2, …, Xn ∼ N(μ,σ2) with unknown σ2 and they are independent, then

    2. Proof: First

      and and S2 are independent. Then by the definition of t distribution,

  4. The sampling distribution of difference between two sample means

    When studying the statistical inference of the means (μ1,μ2) of two normal populations, it is necessary to investigate the distribution of the difference between the sample means (,) of the two normal populations.

    Theorem: Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22) and these two random samples are independent. The means and variances in these two samples are denoted by . and Sx2, Sy2 respectively.

    1. Assume variances σ12, σ22 are known. Then

    2. Assume variances σ12, σ22 are unknown but σ12 = σ22 = σ2. Then where In particular, when n1 = n2, we get .

    3. Proof: Assume σ12 = σ22 = σ2. Then . Besides,

      and Sx2 and Sy2 are independent.

      By the property of χ2 distribution, we obtain

      Also UV are independent, then

      where

  5. Upper percentile of t distribution

    image-20241218180759435
    • Definition: The 100 × α th percentile of a t distribution with n degrees of freedom is denoted by tα(n), where

      P{t>tα(n)} = α

      1. When n ≤ 45 and α is small, we can refer to the value of tα(n) from t distribution table.
      2. When α is larger, it follows from the definition of upper percentile and the symmetry property of t distribution that

      t1 − α(n) =  − tα(n)

      1. When n > 45, tα(n) can be approximated by the upper percentile of N(0,1), that is,

      tα(n) ≈ uα

4.6 F 分布 F distribution

When studying the statistical inference of variances (σ12,σ22)of two normal populations, it is necessary to investigate the distribution of sample variances ratio (S12,S22) of the two normal population.

First we introduce F distribution.

  1. Definition:

    If

    Where X1 ∼ χ2(n1), X2 ∼ χ2(n2) and X1, X2 are independent, then F is said to follow a F distribution with (n1,n2) degrees of freedom, which is denoted by and n1 is referred to as numerator 分子 df and n2 denominator 分母 df.

  2. Remark:

    1. The F distribution is generally positively skewed and the shape of F distribution depends both on the numerator and denominator df.
    2. If a random variable X ∼ F(n1,n2), then
    3. Assume T ∼ t(n). Then T2 ∼ F(1,n). Recall: If X ∼ N(0,1), then X2 ∼ χ2(1).
    • Proof: If T ∼ t(n), then there exist X ∼ N(0,1), Y ∼ χ2(n),and XY are independent such that which gives here X2 ∼ χ2(1), Y ∼ χ2(n), and X2, Y are independent, thus we get T2 ∼ F(1,n).
  3. The sampling distribution of two-sample variances ratio

    • Theorem: Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22) and these two random samples are independent. Also suppose the variances in these two samples are denoted by Sx2, Sy2 respectively. Then

      In particular, when σ12 = σ22, we get

    • Proof: First , and Sx2 and Sy2 are independent.

      Using the definition of F distribution,

      i.e.,

  4. Upper percentile of F distribution

    • Definition: The 100 × α th percentile of an F distribution with n1, n2 degrees of freedom is denoted by Fα(n1,n2), where

      P{F>Fα(n1,n2)} = α

    • Remark:

      • If α(=0.1,0.05,0.025,0.01) is small, then refer to F table to get upper percentile of F distribution.
      • If α(=0.9,0.95,0.975,0.99) is larger, then use F1 − α(n1,n2)= .
    • Proof: Using the definition of upper percentile of F distribution, P{F>F1 − α(n1,n2)} = 1 − α, which derives

      Then Since , it follows that i.e., .

Chapter 5 参数估计 Parameter Estimation

  统计学与概率论的区别就是归纳和演绎,前者通过样本推测总体的分布,而后者已知总体分布去研究样本。因此参数估计则是归纳的过程,参数估计有两种形式:点估计区间估计(点估计和区间估计都是对于未知参数的估计,而点估计给出的是一个参数可能的值区间估计给出的是参数可能在的范围。 - Point estimation 点估计: specify a values as the estimates of population unknown parameters. i.e., sample mean of a certain sampling can be the estimate of population mean. - Interval estimation 区间估计:specify a range within which the true population parameter are likely to fall. This type of problem involves interval estimation.

5.1 点估计 Point Estimation

5.1.1 点估计的概念

点估计(Point estimation):x1, ..., xn是来自总体的一个样本,用于估计未知参数θ的统计量θ̂ = θ̂(x1,...,xn)成为θ的估计量,或称为θ的点估计。

Definition: Suppose θ is an unknown parameter of some population X. Let X1, X2, ..., Xn be a random sample drawn from population X, and x1, x2, ..., xn be a set of corresponding observations.

Now construct an appropriate statistic θ̂(X1,X2,...,Xn) to estimate θ with its value θ̂(x1,x2,...,xn). Then the function θ̂(X1,X2,...,Xn) is called an estimator 估计量 of θ and the value θ̂(x1,x2,...,xn) is called an estimate 估计值 of θ. - The estimator as a statistic is a random variable. - The estimate of an estimator will vary with the different observations of sample.

5.1.2 点估计的方法

  1. 矩估计

    Let X1, X2, …, Xn be a random sample drawn from some population which follows a uniform distribution over interval [0,θ]. Find the estimator of unknown parameter θ.

    To solve this problem, we need to introduce the method of moments 矩估计法.

    image-20241225141613691

    定义:设总体概率函数已知,为p(x;θ1,...,θk)(θ1,...,θk) ∈ Θ是未知参数或参数向量,x1, ..., xn是样本,假定总体的k阶原点矩μk存在,则对所有的jo < j < kμj都存在,若假设θ1, ..., θk能够表示成μ1, ..., μk的函数θj = θj(μ1,...,μk),则可给出诸θj的矩估计:

    其中a1, ..., ak是前k阶样本原点矩.

    矩估计基于大数定律(格里纹科定理),实质是用经验分布函数去替换总体分布,矩估计可以概括为:

  • 用样本矩代替总体矩(可以是原点矩也可以是中心矩);

    • 用样本矩的函数去替换相应的总体矩的函数。
    • The first uncorrected moment E(X) is simply the expected value. The second corrected moment E[(XE(X))2] is the variance. The second uncorrected moment E(X2) = D(X) + [E(X)]2.
  • The idea of the method of moments:

    • The sample moment 样本矩 is used as the estimator of the corresponding population moment 总体矩 E(Xs).
    • Assume F(x;θ1,θ2,...,θr) is the distribution function of population X, where parameters θ1, θ2, ..., θr are unknown. Also assume E(Xk)(k=1,2,...,r) exist。
  • Using the method of moments, the moment estimators θ̂1, θ̂2, ..., θ̂r are obtained by equating the first r sample moments to the corresponding first r population moments and solving for θ1, θ2, ..., θr

  • More precisely,

    when estimating single parameter, it is suffice to solve the following single equation:

    When estimating two parameters, two estimating equations will be needed:

  • 注:矩估计可能是不唯一的,尽量使用低阶矩给出未知参数的估计 。

  1. 最大似然估计

    定义:设总体的概率函数为p(x;θ), θ ∈ Θ,其中θ是一个未知参数或几个未知参数组成的参数向量,Θ是参数空间,x1, ..., xn是来自该总体的样本,将样本的联合概率函数看成θ的函数,用L(θ;x1,...,xn)表示,简记为L(θ)

    L(θ) = L(θ;x1,...,xn) = p(x1;θ)p(x2;θ)...p(xn;θ)

    L(θ)称为样本的似然函数。若统计量θ̂ = θ̂(x1,...,xn)满足

    L(θ̂) = maxθ ∈ ΘL(θ)

    则称θ̂θ最大似然估计,简称MLE(maximum likelihood estimate).

    注:最大似然估计基于样本观测数据,根据概率论思想进行参数估计,首先抽取一定样本,默认这些样本的出现概率是符合原始分布的,即恰好抽到这些样本是因为这些样本出现的概率极大,然后根据概率密度计算联合概率,形成似然函数,似然函数极值位置即为参数的估计值。最大似然估计的前提是已知数据的分布。

    最大似然估计步骤:

    • 写出似然函数;
    • 对似然函数取对数,并整理;
    • 求参数向量的偏导,令其为0,得到似然方程;
    • 求解似然方程,其解为参数值。
  2. 最小均方误差估计

    在样本量一定时,评价一个点估计好坏的度量指标可使用估计值θ̂与参数真值θ的距离函数,最常用的是距离平方,由于θ̂具有随机性,对该函数求期望即得均方误差

    其中,如果θ̂θ的无偏估计,则MSE(θ̂) = Var(θ̂),此时用均方误差评价点估计与用方差是完全一样的。如果如果θ̂不是θ的无偏估计,就要看其均方误差MSE(θ̂),即不仅要看其方差大小,还要看其偏差大小。

    定义:设有样本x1, ..., xn,对待估参数θ,设有一个估计类,如果对该估计类中另外任意一个θ的估计θ̃,在参数空间Θ上都有MSEθ(θ̂) ≤ MSEθ(θ̃),称θ̂(x1,...,xn)是该估计类中θ的一致最小均方误差估计。

  3. 最小方差无偏估计

    定义:θ̂θ的一个无偏估计,如果对另外任意一个θ的无偏估计θ̃,在参数空间Θ = {θ}上都有Varθ(θ̂) ≤ Varθ(θ̃),则称θ̂θ的一致最小方差无偏估计,简记为UMVUE

    判断准则:θ̂ = θ̂(x1,...,xn)θ的一个无偏估计,Var(θ̂) <  + ∞.如果对任意一个满足E(φ(x1,...,xn)) = 0φ,都有

    Covθ(θ̂,φ) = 0,  ∀θ ∈ Θ,

    θ̂θ的UMVUE.

  4. 贝叶斯估计

    区别于频率学派,在统计推断中贝叶斯用到了三种信息:总体信息、样本信息和先验信息(频率学派只用了前两种),其中:

    • 总体信息:总体信息即总体分布或总体所属分布族提供的信息,如,若已知总体是正态分布,则可以知道很多信息;
    • 样本信息:样本信息即抽取样本所得观测值提供的信息,如,在有了样本观测值后,可以根据它知道总体的一些特征数;
    • 先验信息:若把抽取样本看作做一次试验,则样本信息就是试验中得到的信息,如,在一次抽样后,这第一次的抽样就是先验信息。先验信息来源于经验和历史资料。

    回顾贝叶斯公式:设{B1, B2, ...Bn}是样本空间的一个分割,AΩ中的一个事件,P(Bi) > 0i = 1, 2, ..., nP(A) > 0,则

    贝叶斯密度函数形式:

    • 在参数θ分布已知(已假设)的情况下,p(x|θ)表示随机变量θ取某个给定值时总体的条件概率函数,(参考P(A|B));

    • 任一未知量θ都可以看作随机变量,可用一个概率分布去描述,这个分布成为先验分布,该先验分布π(θ),(参考P(B));

    • 贝叶斯的观点,样本X = (x1,...,xn)的产生需分两步:

    • 从先验分布π(θ)产生一个样本θ0

    • p(X|θ0)中产生一组样本。

    此时,样本X = (x1,...,xn)联合条件概率函数(参考)为

    • 因为θ0未知,是从先验分布π(θ)中产生的,所以需要考虑它的发生概率,样本X和参数θ联合分布(参考)为

      h(X,θ) = p(X|θ)π(θ)

    • 因为目的是对θ进行推断,所以在有样本观测值X = (x1,...,xn)之后,可依据h(X,θ)θ作出推断,按照乘法公式(参考1.5.2节),h(X,θ)可分解为

      h(X,θ) = π(θ|X)m(X)

      其中,m(X)X的边际概率函数,类比π(θ)

      m(X) = ∫Θh(X,θ)dθ = ∫Θp(X|θ)π(θ)dθ

      所以可通过条件概率π(θ|X)推断θ的分布

      该分布成为θ后验分布它其实是利用总体和样本对先验分布π(θ)调整的结果,比π(θ)更接近θ的实际情况(机器学习里的贝叶斯模型就是基于这样的原理)

      Flag:感觉贝叶斯定理很有意思,今后也会学习相关的贝叶斯分析数据,敬请期待~

5.1.3 点估计的优良性准则

  1. 无偏性 Unbiasedness:θ̂ = θ̂(x1,...,xn)θ的一个估计,θ的参数空间为Θ,若对任意的θ ∈ Θ,有

    Eθ(θ̂) = θ

    则称θ̂θ无偏估计,否则称为有偏估计。无偏性的要求也可以改写为Eθ(θ̂θ) = 0,无偏性表示表示估计参数与真实参数没有系统偏差。Definition: An estimator θ̂ of a parameter θ is unbiased if E(θ̂) = θ. This means that the average value of θ̂ over a large number of repeated samples of size n is θ.

    • Sample mean is an unbiased estimator of population mean μ, i.e., E() = μ.

    • Sample variance is an unbiased estimator of population variance σ2, i.e., E(S2) = σ2

    • Therefore in practice, we normally choose to use sample mean 、 sample variance S2 as the estimators of population mean μ, population variance σ2 respectively, i.e.,

    μ̂ = ,  σ̂2 = S2

    一个重要的结论:样本均值是总体均值μ的无偏估计。样本方差不是总体方差σ2的无偏估计(而是渐进无偏估计),因此需要对样本方差进行修正,.

    • 样本均值的无偏性推导

    • 样本方差的有偏性推导
  2. 有效性 Effectiveness

    In practice, it is desirable that not only the estimator is unbiased, but also the deviation between θ̂ and θ as small as possible.

    If θ̂ is the unbiased estimator of θ, that is E(θ̂) = θ, then

    E((θ̂θ)2) = E((θ̂E(θ̂))2) = D(θ̂)

    This suggests the smaller the variance D(θ̂), the closer θ̂ is to θ, the more effective θ̂ is.

    In other words, smaller D(θ̂) implies the estimator θ̂ is more precise when estimating parameter θ.

    无偏估计往往有很多种,以总体均值为例,x1, ..., xn是取自某总体的样本,样本均值μ和样本xi都是总体均值的无偏估计,对于两个估计参数的选取需要基于一个度量无偏估计优劣的准则。有效性作为这样的准则,反映了参数估计值和参数真值的波动,波动大小可用方差来衡量,波动越小表示参数的估计越有效。

    θ的两个无偏估计,如果对任意的θ ∈ Θ

    Var(θ̂1) ≤ Var(θ̂2)

    且至少有一个θ ∈ Θ使得上述不等号严格成立,则称θ̂1θ̂2有效。

    Definition: Suppose θ̂1θ̂2 are two unbiased estimators of unknown population parameter θ. If D(θ̂1) < D(θ̂2)

    then θ̂1 is said to be more effective than θ̂2.

    Conclusion:

    In the unbiased estimators of the population mean μ expressed as

    the variance of the sample mean is the smallest, so is the most effective unbiased estimator for μ.

    Proof: 显然当 时,有 ,即 μ 的无偏估计。 又 由均值不等式 从而, 其中在 ,不等式取等号,即 其中 ci ≥ 0 中样本均值 的方差最小, μ 的最有效的无偏估计量。

  3. 相合性

    根据格里纹科定理,随着样本量不断增大,经验分布函数逼近真实分布函数,即设θ ∈ Θ为未知参数,θ̂n = θ̂n(x1,...,xn)θ的一个估计量,n是样本容量,若对任何一个ϵ > 0,有

    limn → ∞P(|θ̂nθ|≥ϵ) = 0

    则称θ̂n为参数θ的相合估计。

    定理1:θ̂n = θ̂n(x1,...,xn)θ的一个估计量,若 limn → ∞E(θ̂n) = θ,  limn → ∞Var(θ̂n) = 0

    θ̂nθ的相合估计。

    定理2:θ̂n1, ..., θ̂nk分别是θ1, ..., θk的相合估计,η = g(θ1,...,θk)θ1, ..., θk的连续函数,则η̂n = g(θ̂n1,...,θ̂nk)η的相合估计。

    矩估计一般都具有相合性:

    • 样本均值是总体均值的相合估计;
    • 样本标准差是总体标准差的相合估计;
    • 样本变异系数s/是总体变异系数的相合估计。
  4. 渐进正态性(MLE)

    在很一般条件下,总体分布p(x;θ)中的θ的MLEθ̂n具有相合性和渐进正态性,即,其中n为样本容量,为费希尔信息量。

  5. 充分性(UMVUE)

    • 任一参数θ的UMVUE不一定存在,若存在,则它一定是充分统计量的函数;
    • θ的某个无偏估计θ̂不是充分统计量T = T(x1,...,xn)的函数,则通过条件期望可以获得一个新的无偏估计,且方差比原估计的方差要小;
    • 考虑θ的估计时,只需要在其充分统计量的函数中寻找即可,该说法对所有统计推断都是正确的,这便是充分性原则。

5.2 区间估计 Interval Estimation

5.2.1 区间估计的概念

  1. 双侧区间

    θ是总体的一个参数,其参数空间为Θx1, ..., xn是来自该总体的样本,对给定的一个α  (0<α<1),假设有两个统计量θ̂L = θ̂L(x1,...,xn)θ̂U = θ̂U(x1,...,xn),若对任意的θ ∈ Θ,有

    Pθ(θ̂Lθθ̂U) ≥ (=)1 − α

    其中,总体为连续分布时取等号,表示用足了置信水平。称随机区间[θ̂L,θ̂U]θ置信水平为1 − α的置信区间,或简称[θ̂L,θ̂U]θ1 − α置信区间θ̂Lθ̂U分别称为θ置信下限置信上限

    Definition: Assume the population parameter θ is unknown. If there are two statistics θ̂1 = θ̂1(X1,X2,…,Xn), θ̂2 = θ̂2(X1,X2,…,Xn) and θ̂1< θ̂2 such that for any given α(0<α<1), P{θ̂1<θ<θ̂2} = 1 − α

    Then (θ̂1,θ̂2) is called a 100% × (1−α) or 1 − α confidence interval 置信区间 for θ. Here 100% × (1−α) or 1 − α is referred to as confidence level 置信水平.

    • θ is some determinate number, θ̂1, θ̂2 are random variables, (θ̂1,θ̂2) is random interval随机区间。
    • (θ̂1,θ̂2) contains θ with a probability of 1 − α, or the probability of (θ̂1,θ̂2) containing θ is 1 − α.
    • The confidence intervals vary with the observations of sample. Any one confidence interval from a particular sample may or may not contain the unknown parameter θ.
    • Therefore, we can say over the collection of all 95% Cls that could be constructed from repeated random samples of size n, 95 of all these intervals will contain the parameter θ. The remaining 5 % of all Cls will not contain the the parameter θ.

    置信水平1 − α的频率解释:在大量的区间估计观测值中,至少有100(1−α)%包含θ,如下图所示,其置信度为0.95.

    confidence_interval.gif
  2. 单侧区间

    θ̂L = θ̂L(x1,...,xn)是统计量,对给定的α ∈ (0,1)和任意的θ ∈ Θ,有

    Pθ(θ̂Lθ) ≥ 1 − α,  ∀θ ∈ Θ

    则称θ̂Lθ的置信水平为1 − α置信下限。同理,设θ̂U = θ̂U(x1,...,xn)是统计量,对给定的α ∈ (0,1)和任意的θ ∈ Θ,有

    Pθ(θ̂Lθ) ≥ 1 − α,  ∀θ ∈ Θ

    则称θ̂Lθ的置信水平为1 − α置信上限

5.2.2 区间估计的方法

  1. 枢轴量法

    Step 1:设法构造一个样本和θ的函数G = G(x1,...,xn,θ)使得G的分布不依赖于未知参数,称具有这种性质的G为枢轴量。

    Step 2:适当地选择两个常数c,d,使对给定的α  (0<α<1),有

    P(cGd) = 1 − α

    (在离散场合,将上式等号改为

    Step 3:假如能将c ≤ G ≤ d进行不等式等价变形化为θ̂L ≤ θ ≤ θ̂U,则有

    Pθ(θ̂Lθθ̂U) = 1 − α

    表明[θ̂L,θ̂U]θ1 − α同等置信区间。

    注:满足条件的c和d有很多,最终选择的目的是希望平均长度Eθ(θ̂U) − θ̂L尽可能短,但在一些场合中很难做到这一点,因此可以选择c和d,使得两个尾部概率各为α/2,即

    Pθ(G<c) = Pθ(G>d) = α/2

    得到等尾置信区间

    例:设x1, ..., xn是来自均匀总体U(0,θ)的一个样本,试对设定的α (0<α<1)给出θ1 − α同等置信区间。

    解:三步法:

    • 已知θ的最大似然估计为样本的最大次序统计量x(n),而x(n)/θ的密度函数为 p(y;θ) = nyn − 1,  0 < y < 1 它与参数θ无关,故可取x(n)/θ作为枢轴量G
    • 由于x(n)/θ的分布函数为F(y) = yn0 < y < 1,故P(cx(n)/θd=dncn),因此可以选择适当的c和d满足 dn − cn = 1 − α
    • 0 ≤ c < d ≤ 1dn − cn = 1 − α的条件下,当时,Eθ(θ̂U) − θ̂L取最小值,所以1 − α置信区间

5.2.3 一些情况下的区间估计

  1. 单个正态总体参数的置信区间

    • σ已知时μ的置信区间
    • σ未知时μ的置信区间
    • σ2的置信区间(μ, σ未知)[(n−1)s2/χα/22(n−1),  (n−1)s2/χ1 − α/22(n−1)]
  2. 大样本置信区间

  3. 两个正态总体下的置信区间

    • μ1 − μ2的置信区间

      • σ12σ22已知时
      • σ12 = σ22 = σ2未知时
      • σ22/σ12 = c已知时
      • 当m和n都很大时的近似置信区间
      • 一般情况下的近似置信区间[s0t1 − α/2(l),  +s0t1 − α/2(l)]
    • σ12/σ22的置信区间

Chapter 6 假设检验 Hypothesis Testing

6.1 假设检验的基本思想和概念

  1. 基本思想

    以“女士品茶”为例,对于该女士有没有品茶的能力,有两种假设:该女士没有品茶能力和该女士有品茶能力。在统计上这两个非空不相交参数集合称作统计假设,简称假设。通过样本对一个假设作出对与不对的判断,则称为该假设的一个检验。若检验结果否定该命题,则称拒绝这个假设,否则就接受(不拒绝)这个假设。

    Test whether H0:  μ = μ0 is correct or not by contradiction 反证法:

    • first assume that the null hypothesis H0 : μ = μ0 is true.
    • under H0, we infer according to the sampling distribution theory and sample information.
    • reject H0 if we get contradictory conclusions based on small probability principle; otherwise, accept H0.

    Small probability principle 小概率原理: the event with probability no more than 0.05 is almost impossible to occur in just one trial.

    假设可分为两种:1. 参数假设检验 parametric test,即已经知道数据的分布,针对总体的某个参数进行假设检验 population distribution is known but population parameter is unknown;2. 非参数假设检验 nonparametric test,即数据分布未知,针对该分布进行假设检验 population distribution is unknown。

  2. 假设检验的基本步骤

    建立假设—>选择检验统计量,给出拒绝域形式—>选择显著性水平—>给出拒绝域—>做出判断

    Step 1:建立假设

    主要针对参数假设检验问题

    设有来自某分布族{F(x,θ)|θ ∈ Θ}的样本x1, ..., xn,其中Θ为参数空间,设Θ0 ∈ Θ,且Θ0 ≠ ϕ,则命题H0 : θ ∈ Θ0称为原假设零假设(null hypothesis),若有另一个Θ1Θ1 ∈ Θ, Θ1Θ0 = ϕ,常见的一种情况是Θ1 = Θ − Θ0),则命题H1 : θ ∈ Θ1称为H0对立假设备择假设(alternative hypothesis),当H0为简单假设,即Θ0只含一个点时,备择假设有三种可能:H1′ : θ ≠ θ0H1″ : θ < θ0H1‴ : θ > θ0

    The null hypothesis 零假设,denoted by H0, is the hypothesis that is to be tested. The null hypothesis is a statement of no change, no effect or no difference and is assumed true until evidence indicates otherwise.

    The alternative hypothesis 备择假设,denoted by H1, is the hypothesis that in some sense contradicts the null hypothesis and is a statement that we are trying to find evidence to support.

    In general, the null hypothesis is represented by the value of the unknown population parameter is equal to some specific value, i.e.,

    H0 : parameter  =  some value   (H0:  μ=μ0)

    The alternative hypothesis is allowed to be either greater than or less than some specific value. H1 : parameter some value two-tailed test 双侧检验 H1 : parameter > some value right(upper)-tailed test 单侧检验 H1 : parameter < some value left(lower)-tailed test 单侧检验

    Step 2:选择检验统计量,给出拒绝域形式

    根据样本计算统计量Z(如样本均值、标准差等,称为检验统计量),并基于某个法则既可以决定接受H0还是拒绝H0,具体地,当统计量在拒绝域W (rejection region) 中即拒绝H0,在接受域 (acceptance region) 中即接受H0。由此可见,一个拒绝域W唯一确定一个检验法则,反之,一个检验法则也唯一确定一个拒绝域。

    注:不能用一个样本(例子)证明一个命题(假设成立),但是可以用一个样本(例子)去推翻一个命题。此外,拒绝域与接受域之间有一个模糊域,即统计量恰好符合法则,通常将模糊域归为接受域,因此接受域是复杂的。

    Step 3:选择显著性水平

    假设检验基于小概率事件,即小概率事件在一次试验中几乎不会发生,因此选择一个很小的概率值α,令p(H0|H0) ≤ α,表示Z ∈ W是一个小概率事件,在一次试验中不应该发生。如果通过样本得到的统计量z ∈ W,即不该发生的小概率事件竟然发生了,那么应该拒绝H0

    由于向本是随机的,通常做检验时可能做出错误判断,由此引入了两个错误,分别为第一类错误第二类错误,如下表所示。

    观测数据情况 总体情况 总体情况
    H0为真 H1为真
    拒绝H0 第一类错误(拒真) 正确
    接受H0 正确 犯第二类错误(取伪)

    犯第一类错误概率:α = P(XW|H0),即α = P(H0|H0)

    犯第二类错误概率:,即β = P(H0|H0)

    Definition: The probability of a type I error 第一类错误,which is usually denoted by α, is the probability of rejecting H0 when H0 is true, (“reject the true” 拒真)

    α = P{ type I error } = P{ reject H0 when H0 true }

    Definition: The probability of a type II error 第二类错误, which is usually denoted by β, is the probability of accepting H0 when H1 is true, (“accept the false” 取伪)

    β = P{ type II error } = P{ accept H0 when H1 true }

    可以证明的,在一定样本量下,两类错误概率无法共同减小,但是当样本增加时,可以同时减小。A common practice is to limit α first and then to determine sample size to make β as small as possible. 通常限制犯第一类错误的概率,然后适当确定样本容量使犯第二类错误的概率尽可能小。

    证明该问题需要引入是函数,下面将简单介绍势函数,但不对上述结论证明。

    定义:设检验问题H0 : θ ∈ Θ0  vs  H1 : θ ∈ Θ1的拒绝域为W,则样本观测值X落在拒绝域W内的概率称为该检验的势函数,记为

    第一类错误概率α即为初始设定的很小的概率,称为置信水平 significance level,称该检验时显著性水平为α的显著性检验,简称水平为α的检验。为了尽量减少两类错误,可简单的将其简化为减小第一类错误概率(第二类错误概率难求)。常用的α = 0.05有时也选择0.1或0.01。

    Step 4:给出拒绝域

    为了使得第一类错误的概率尽可能小,给定一个较小的α,并选择一个数k,设定若Z ≥ k拒绝H0,使得,所以k = uα/2

    注:算拒绝域时,需基于标准正态分布。

    Step 5:做出判断

    通过样本计算统计量,若统计量在拒绝域中,则拒绝原假设,否则接受原假设。

  3. 检验的p

    不同置信水平α的取值,可能会存在不同的结果。因此引入新的指标,即利用样本观测值能够作出拒绝原假设的最小显著水平,称为检验的p。由检验的p值与心目中的显著性水平α进行比较,可以容易做出检验结论:

    • α ≥ p,则在显著性水平α下拒绝H0
    • α < p,则在显著性水平α下接受H0.

    注:一般以p < 0.05 为有统计学差异, p < 0.01 为有显著统计学差异,p < 0.001为有极其显著的统计学差异。

6.2 One-Sample Hypothesis Testing 单样本假设检验

Tests of hypotheses based on one sample from N(μ,σ2)

  1. One-sample u test for the mean of N(μ,σ2) with σ2 known
  2. One-sample t test for the mean of N(μ,σ2) with σ2 unknown
  3. One-sample χ2 test for the variance of N(μ,σ2)

Tests of hypotheses based on two samples

  1. Two-sample paired t test
  2. Two-sample t test
  3. Two-sample F test

One-sample u test for the mean of a normal distribution with known variance: two-tailed case

Summarize the steps in below:

  1. Establish hypothesis H0 : μ = μ0 vs. H1 : μ ≠ μ0
  2. Calculate the value of test statistic according to observations
  3. Find for a given significance level of α
  4. Make statistical inference:
    • If , then H0 is rejected at a significance level of α, and it is considered that there is a significant difference between μ and μ0.
    • If , then H0 is accepted at a significance level of α, and it is considered that there is no significant difference between μ and μ0.
image-20241218185843654

One-sample u test for the mean of a normal distribution with known variance: one-tailed case

Summarize the steps below:

  1. Establish hypothesis

H0 : μ = μ0 vs. H1 : μ > μ0( or H1:μ<μ0)

  1. Calculate the value of test statistic according to observations

  1. Find uα for a given significance level of α

  2. Make statistical inference:

    If u > uα, then H0 is rejected at a significance level of α. If u ≤ uα, then H0 is accepted at a significance level of α; or (If u <  − uα, then H0 is rejected at a significance level of α. If u ≥  − uα, then H0 is accepted at a significance level of α.)

image-20241218190021954

One-sample t test for the mean of a normal distribution with unknown variance

We want to test

H0 : μ = μ0 vs. H1 : μ ≠ μ0

If the variance σ2 is unknown, we just replace σ2 by sample variance S2. Under H0:  μ = μ0, we have

Then the steps for two-tailed t test, which is similar to one-sample u test, is given below:

  1. Establish hypothesis H0 : μ = μ0 vs.   H1 : μ ≠ μ0
  2. Calculate the value of test statistic according to observations

  1. Find for a given significance level of α

  2. Make statistical inference:

    If , then H0 is rejected at a significance level of α. If , then H0 is accepted at a significance level of α.

    Remark: The above test procedure is called a t test because the test statistic

    image-20241218190503280
  3. The steps for one-sample t test in one-tailed case

    1. Establish hypothesis

    H0 : μ = μ0 vs. H1 : μ > μ0( or H1:μ<μ0)

    1. Calculate the value of test statistic according to observations

    1. Find tα for a given significance level of α.

    2. Make statistical inference:

      • If t > tα(n−1), then H0 is rejected at a significance level of α. If t ≤ tα(n−1), then H0 is accepted at a significance level of α; or If t <  − tα(n−1), then H0 is rejected at a significance level of α. If t ≥  − tα(n−1), then H0 is accepted at a significance level of α.)
      image-20241218190646691

One-sample χ2 test for the variance of a normal distribution

If X1, X2, …, Xn are random sample from an N(μ,σ2) distribution with unknown μ and σ2.

We want to test the hypothesis

H0 : σ2 = σ02   vs.   H1 : σ2 ≠ σ02

Here σ02 is known.

Under H0 : σ2 = σ02, consider S2 is unbiased estimator of σ2, we known that

Two-tailed test H0 : σ2 = σ02;  H1 : σ2 ≠ σ02

Steps:

  1. Establish hypothesis H0 : σ2 = σ02 vs. H1 : σ2 ≠ σ02
  2. Calculate the value of test statistic according to observations

  1. Find χα/22(n−1) and for a given significance level of α.

  2. Make statistical inference

    If or , then H0 is rejected at a significance level of α.

    If , then H0 is accepted at a significance level of α.

image-20241218134633679
image-20241218191150037

6.3 Two-Samples Hypothesis Testing 双样本假设检验

  1. Introduction:

    All the tests introduced before were one-sample tests: Test for mean: one-sample u test, one-sample t test Test for variance: one-sample χ2 test. Actually, a more frequently encountered situation is the two-sample hypothesis testing problem.

    These two samples can be paired 配对的 or can be completely independent.

  2. Definition: Two samples are said to be paired when each data point in the first sample is matched and is related to a unique data point in the second sample.

    Definition: Two samples are said to be independent when each data points in one sample are unrelated to the data points in the second sample.

  3. Remark

    1. The two paired samples are not independent.
    2. The paired samples may represent two sets of measurements.
      1. On the same subject: in this case, each subject is used as its own control
      2. On different subjects: that are similar to each other in matching criteria, such as age, twins and so on.
  4. Paired t test for mean

    1. Because the paired samples are not independent, we consider the difference di(i=1,2,…,n) between these two sample points and then di(i=1,2,…,n) can be regarded as a random sample from a new population.

    2. The new population (i.e., all the possible differences) can be understood as a result caused by many minute independent random factors, and be regarded to follow a normal distribution N(μd,σd2), here μd, σd2 are the population mean and population variance respectively.

    3. To test whether there is a significant difference between th-5321`2is two samples implies to test the whether population mean

      μd = 0

      Hence,

      H0 : μd = 0   vs.   H1 : μd ≠ 0

      The hypothesis testing problem is reduced to one-sample t test for mean with unknown variance σd2 based on differences di(i=1,2,…,n).

      The test statistic is

      Where: is the sample mean of differences di(i=1,2,…,n) Sd is the sample standard deviation of differences di(i=1,2,…,n) n is the number of matched pairs.

  5. Two-sample t test for independent samples

    Now we test the equality of two means of two independent samples. Suppose X1, X2, …, Xn1 ∼ N(μ1,σ12), Y1, Y2, …, Yn2 ∼ N(μ2,σ22) and these two random samples are independent. The means and variances in these two samples are denoted by , , S12, S22 respectively.

    We want to test the hypothesis

    H0:  μ1 = μ2   vs.   H1 : μ1 ≠ μ2

    We will base the significance test on the difference between the two sample means,  − .

    Assume variances σ12, σ22 are known.

    Frist from the sampling distribution of  − , we have

    Under H0:  μ1 = μ2,

    Then the test

    H0:  μ1 = μ2   vs.   H1 : μ1 ≠ μ2

    can be performed similarly to one-sample u test using test statistic

    Assume variances σ1L, σ2L are unknown and the variances are the same, i.e., σ12 = σ22 = σ2.

    Similarly, to test H0 : μ1 = μ2, we first consider the sampling distribution  − . From chapter 4 , we know

    where

    Then the test

    H0:  μ1 = μ2   vs.   H1 : μ1 ≠ μ2

    with equal variances can be performed similarly to one-sample t test using test statistic

    with

  6. Testing for the equality of two variances

    In the following sections, we shall test

    The equality of two variances 方差齐性检验

    We want to test

    H0 : σ12 = σ22   vs.   H1 : σ12 ≠ σ22

    Similar to the idea of one-sample χ2 test for variance, this test is also based on the ratio of sample variance rather than the difference S12 S22

    From the sampling distribution of in chapter 4 , we have

    Under H0 : σ12 = σ22, it follows that

    Now steps for the equality of two variances is given below.

  7. Steps for F test

    1. Establish hypothesis

      H0 : σ12 = σ22   vs.   H1 : σ12 ≠ σ22

    2. Calculate the value of test statistic according to observations

      (To simplify the calculation, we normally choose the larger variance as numerator, such that ).

    3. Find for a given significance level α.

      Also, according to the property F distribution, we have

      Then it suffices to find the critical value .


Author: thyzzs
Reprint policy: All articles in this blog are used except for special statements CC BY-NC-SA 4.0 reprint policy. If reproduced, please indicate source thyzzs !
评论
 Previous
生理学笔记 生理学笔记
做一个研究「人」的医生,要培养自己的能力,还需要走出去——到不同的环境里去了解人,了解他们的习惯、性格、生活与行为的模式,以及他们的缺点、长处与特性。
2024-10-17
Next 
技术栈与项目栈 技术栈与项目栈
“盖士人读书,第一要有志,第二要有识,第三要有恒。有志则不甘为下流;有识则知学问无尽,不敢以一得自足,如河伯之观海,如井蛙之窥天,皆无识者也;有恒则断无不成之事。此三者缺一不可。”
2024-05-13
  TOC